﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/meta.tpl"-}
<title>类别目录 - 后台</title>
</head>

<body>
<div class="sAll">

{-include file="`$__PHY_WEB``$__DIR_ADM`/block/header.tpl"-}
{-php-}include(__PHY_WEB.__DIR_ADM."/block/menu.php");{-/php-}
{-include file="`$__PHY_WEB``$__DIR_ADM`/block/menu.tpl" uL=$rNav-}

<div class="sL">
	<div class="sW main">
<!-- <main> -->
{- if $sMsg -}{- include file="`$__PHY_WEB``$__DIR_ADM`/block/message.tpl" -}{- /if -}

{- if 'list'==$sAction -}
<div class="sL list">
	<p>列表</p>
	<table>
		<tr class="capt">
			<td>ID</td>
			<td>导航路径</td>
			<td><a href="?action=new">添加顶级导航</a></td>
		</tr>
{-section name=i loop=$rList-}
		<tr>
			<td>{-$rList[i].id|escape:html-}</td>
			<td>{-html_breadcrumb from=$rList[i].BreadCrumb-}
				{-if $rList[i].name-}({-$rList[i].name|escape:html-}){-/if-}</td>
			<td><a href="?action=edit&id={-$rList[i].id-}">修改</a>
				<a href="?action=new&parent={-$rList[i].id-}">添加子导航</a>
			</td>
		</tr>
{-/section-}
		<tr class="capt">
			<td>ID</td>
			<td>导航路径</td>
			<td><a href="?action=new">添加顶级导航</a></td>
		</tr>
	</table>
</div>
{- elseif 'edit'==$sAction -}
<div class="sL edit">
	<p>修改导航</p>
	<table>
		<form method="post" action="?" enctype="multipart/form-data">
		<input type="hidden" name="id" value="{-$rOne.id|escape:html-}" />
		<tr>
			<td class="indc">上级目录：</td><td>
				<input type="hidden" name="parent_id" value="{-$rOne.parent_id|escape:html-}" />
				{-if $rBreadCrumb-}{-html_breadcrumb from=$rBreadCrumb-}
				{-else-}&lt; 顶级目录 &gt;{-/if-}
			</td>
		</tr>
		<tr>
			<td class="indc">英文标记：</td>
			<td><input type="text" name="name" value="{-$rOne.name|escape:html-}" class="long" /></td>
		</tr>
		<tr>
			<td class="indc">显示标题：</td>
			<td><input type="text" name="title" value="{-$rOne.title|escape:html-}" class="long" /></td>
		</tr>
		<tr>
			<td class="indc">链接地址：</td>
			<td><input type="text" name="url" value="{-$rOne.url|escape:html-}" class="long" />
				（留空表示点击无效）
			</td>
		</tr>
		<tr>
			<td class="indc">序号：</td>
			<td><select name="rank">
{-section name=i loop=$rSlctRanks-}
{-if $rOne.id==$rSlctRanks[i].id-}
				<option value="{-$rSlctRanks[i].rank-}" selected="selected">{-$rSlctRanks[i].rank-} 【当前位置】</option>
{-else-}
				<option value="{-$rSlctRanks[i].rank-}">{-$rSlctRanks[i].rank-} &gt; {-$rSlctRanks[i].title|escape:html-}</option>
{-/if-}
{-/section-}
			</select></td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="action" value="update" />
				<input type="submit" name="action" value="delete" onclick="return confirm('确定要删除吗？');" />
				<input type="submit" name="action" value="cancel" />
			</td>
		</tr>
		</form>
	</table>
</div>
{- elseif 'new'==$sAction -}
<div class="sL edit">
	<p>添加导航</p>
	<table>
		<form method="post" action="?" enctype="multipart/form-data">
		<tr>
			<td class="indc">上级导航：</td><td>
				<input type="hidden" name="parent_id" value="{-$rFilter.parent-}" />
				{-if $rBreadCrumb-}{-html_breadcrumb from=$rBreadCrumb-}
				{-else-}&lt; 顶级导航 &gt;{-/if-}
			</td>
		</tr>
		<tr>
			<td class="indc">英文标记：</td>
			<td><input type="text" name="name" value="{-$rOne.name|escape:html-}" class="long" /></td>
		</tr>
		<tr>
			<td class="indc">显示标题：</td>
			<td><input type="text" name="title" value="{-$rOne.title|escape:html-}" class="long" /></td>
		</tr>
		<tr>
			<td class="indc">链接地址：</td>
			<td><input type="text" name="url" value="{-$rOne.url|escape:html-}" class="long" />
				（留空表示点击无效）
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" name="action" value="add" />
				<input type="submit" name="action" value="cancel" />
			</td>
		</tr>
		</form>
	</table>
</div>
{- else -}
sth wrong: no $sAction.
{- /if -}

<!-- </main> -->
	</div>
</div>

{- include file="`$__PHY_WEB``$__DIR_ADM`/block/footer.tpl" -}

</div><!-- end all -->
</body>
</html>
